<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<link id="lnk" rel="preload" as="image" href="http://prefetch.wut.com.test/3.gif">
<script>
description("Inserting a <link rel=preload> into a bare document shouldn't crash.");

window.jsTestIsAsync = true;

function runTest() {
    var doc = document.implementation.createDocument("", "", null);
    doc.appendChild(document.getElementById("lnk"));
    testPassed("no crash");
    finishJSTest();
}

window.onload = runTest;
</script>
</body>
</html>
